//
//  TZRecommendCell.m
//  X-Tribe
//
//  Created by my-pc on 16/3/30.
//  Copyright © 2016年 Miss.Ou. All rights reserved.
//

#import "TZRecommendCell.h"
@interface TZRecommendCell()
@property(nonatomic,weak)UILabel *nameLabel;
@end

@implementation TZRecommendCell
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        //创建子控件
        [self createSubViews];
    }
    return self;
    
}

//创建子控件
-(void)createSubViews
{
    //屌丝方块
    UIImageView *RecomImg = [[UIImageView alloc]init];
    RecomImg.image = [UIImage imageNamed:@"cycle_image1.jpg"];
    self.contentView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:RecomImg];
    [RecomImg mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.left.right.mas_equalTo(0);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(-20);
    }];
    RecomImg.backgroundColor = [UIColor whiteColor];
    
    //文字
    UILabel *label = [[UILabel alloc]init];
    [self.contentView addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.left.right.mas_equalTo(0);
        make.top.equalTo(RecomImg.mas_bottom).offset(10);
        
    }];
    label.backgroundColor = [UIColor whiteColor];
    label.textAlignment = NSTextAlignmentCenter;
    self.nameLabel = label;
}

-(void)setRecommName:(NSString *)RecommName
{
    _RecommName = RecommName;
    self.nameLabel.text = RecommName;
    


}
@end












